using System;
using System.Data;

using Wicresoft.Common;

namespace Wicresoft.Messages.Entity
{
    [Table("UserSMSWeekTimeRule", "", "Wicresoft.Messages.ConnectionString")]
	public class UserSMSWeekTimeRule : Info
	{
		#region SQL column name consts 
		public const string SQLCOL_USERNAME = "UserName";
		public const string SQLCOL_SUNDAYRULE = "SundayRule";
		public const string SQLCOL_MONDAYRULE = "MondayRule";
		public const string SQLCOL_TUESDAYRULE = "TuesdayRule";
		public const string SQLCOL_WEDNESDAYRULE = "WednesdayRule";
		public const string SQLCOL_THURSDAYRULE = "ThursdayRule";
		public const string SQLCOL_FRIDAYRULE = "FridayRule";
		public const string SQLCOL_SATURDAYRULE = "SaturdayRule";
		#endregion


		#region Contructors
		/// <summary>
		/// Construct empty entity
		/// </summary>
		public UserSMSWeekTimeRule () {}

		/// <summary>
		/// Construct entity by primary key, other fields will be assigned by 
		/// "Load" method.
		/// </summary>
		public UserSMSWeekTimeRule (string UserName)
		{
			this.UserName = UserName;
		}
		#endregion

		public override void Init (DataRow row)
		{
			UserName = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_USERNAME]);
			SundayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_SUNDAYRULE]);
			MondayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_MONDAYRULE]);
			TuesdayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_TUESDAYRULE]);
			WednesdayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_WEDNESDAYRULE]);
			ThursdayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_THURSDAYRULE]);
			FridayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_FRIDAYRULE]);
			SaturdayRule = (string)ObjectType.StringTypeHelper.Read(row[SQLCOL_SATURDAYRULE]);
		}

		#region Properties 
		#region Property <string> UserName
		[Property("UserName", 100, SqlDbType.NVarChar, false, true)]
		public string UserName 
		{
			get { return _UserName; }
			set { _UserName = value; }
		}
		private string _UserName = null;
		#endregion

		#region Property <string> SundayRule
		[Property("SundayRule", 24, SqlDbType.Char, false, false)]
		public string SundayRule 
		{
			get { return _SundayRule; }
			set { _SundayRule = value; }
		}
		private string _SundayRule = null;
		#endregion

		#region Property <string> MondayRule
		[Property("MondayRule", 24, SqlDbType.Char, false, false)]
		public string MondayRule 
		{
			get { return _MondayRule; }
			set { _MondayRule = value; }
		}
		private string _MondayRule = null;
		#endregion

		#region Property <string> TuesdayRule
		[Property("TuesdayRule", 24, SqlDbType.Char, false, false)]
		public string TuesdayRule 
		{
			get { return _TuesdayRule; }
			set { _TuesdayRule = value; }
		}
		private string _TuesdayRule = null;
		#endregion

		#region Property <string> WednesdayRule
		[Property("WednesdayRule", 24, SqlDbType.Char, false, false)]
		public string WednesdayRule 
		{
			get { return _WednesdayRule; }
			set { _WednesdayRule = value; }
		}
		private string _WednesdayRule = null;
		#endregion

		#region Property <string> ThursdayRule
		[Property("ThursdayRule", 24, SqlDbType.Char, false, false)]
		public string ThursdayRule 
		{
			get { return _ThursdayRule; }
			set { _ThursdayRule = value; }
		}
		private string _ThursdayRule = null;
		#endregion

		#region Property <string> FridayRule
		[Property("FridayRule", 24, SqlDbType.Char, false, false)]
		public string FridayRule 
		{
			get { return _FridayRule; }
			set { _FridayRule = value; }
		}
		private string _FridayRule = null;
		#endregion

		#region Property <string> SaturdayRule
		[Property("SaturdayRule", 24, SqlDbType.Char, false, false)]
		public string SaturdayRule 
		{
			get { return _SaturdayRule; }
			set { _SaturdayRule = value; }
		}
		private string _SaturdayRule = null;
		#endregion
		#endregion




	}
}
